package com.tenebrous.jestic.compents.filter;
 
import com.rain.ops.sdk.utils.UUIDUtils;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 过滤器配置类
 */
@Configuration
public class FilterConfig {

    @Bean
    public FilterRegistrationBean FilterRegistrationBean(){
        FilterRegistrationBean filterRegistrationBean=new FilterRegistrationBean(new InterfaceFilter());
        //添加过滤路径
        filterRegistrationBean.addUrlPatterns("/*");
        return filterRegistrationBean;
    }

    public static void main(String[] args) {
        System.out.println(UUIDUtils.randomUUID());
    }
 
}